package command;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName Invoker
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2021/7/20 16:59
 * @Version 1.0
 */
public class Invoker {
	private List<Command> commands = new ArrayList<>();

	public void addCommand(Command command) {
		commands.add(command);
	}

	public void execute() {
		commands.forEach(Command::execute);
	}
}
